<!DOCTYPE html>
<html>
<head>
  <script type="text/javascript" src="../resource/jweixin1002.js"></script>
  <script type="text/javascript" src="../resource/jweixin1.js"></script>
  <script src="../resource/jquery1.js"></script>
  <script src="../resource/qrcode.js"></script>
  <script src="../resource/jquerybarcode.js"></script>
  <script src="../resource/api.js"></script>
  <script src="../script/api.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <title>交易结果</title>

  <style>
    body{
         overflow-x:hidden;
         margin: 0;
    }
  </style>
</head>
<body>
       <header id="statusBar" style="background: #298cb4;">
		<div style="width:100%;display:table;height: 50px;" >
			<div style="float:left;width: 20%;height: 50px;line-height: 50px;" tapmode="presshover" onclick="api.closeWin();">
			  <div style="float:left;width: 30%;height: 50px;">
			   <img style="width: 24px;margin-top: 13px;" src="../image/back.png" />
			   </div>
			   <div style="float:left;width: 50%;color: #ffffff;">
			   返回
			   </div>
			</div>
			<div style="float:left;width: 60%;height: 50px;line-height: 50px;text-align: center;font-weight:bold;color: #ffffff;">
			 交易结果
			</div>
		</div>
	</header>
<div style="height: 70px;"></div>

</div>
<div style="text-align: center;">
  <img src="../image/dui.png" id="resImg" style="width:45%;margin-top:5%;align:center"/>
  <p id="resSta" style="align:center;margin-top:20px;font-size:20px;font-weight: bold;color: #adadad">交易成功</p>
  <div id="je" style="font-size: 24px;font-weight: 600;">

  </div>
   <div id="ddno" style="margin-top: 20px;">
          </div>
   <div style="display: table;width: 100%;text-align: center;" id="msgc">
</div>
</div>
  <div style="position: absolute;bottom: 0;margin-bottom: 30px;width:100%;text-align: center;" onclick="back();" tapmode="presshover">
    <div style="width:80%;height:35px;background: #27a8fa;margin:0 auto;color:#fff;line-height: 35px;border-radius:5px;">完成</div>
  </div>
<script type="text/javascript">
  apiready = function(){
     $api.fixStatusBar( $api.dom('header') );
     if(api.systemType == "ios"){
       document.getElementById("statusBar").style.background = "#298cb4";
     }
     api.parseTapmode();
     var status = api.pageParam.zt;
     if(2 == status){
     var msg = "失败原因："+api.pageParam.msg;
       $("#resImg").attr('src','../image/cuo.png');
       document.getElementById("resSta").innerHTML = "交易失败"
       $("#msgc").html(msg);
       $("#je").hide();
       $("#msgc").show();
       $("#ddno").hide();
     }else if(1 == status){
       var atm = api.pageParam.amt;
       var no = api.pageParam.id;
       $("#je").html("￥"+atm+"元");
       $("#ddno").html(no);
     }
  };
  function back() {
     api.closeToWin({
	     name: 'root'
     });
	  // window.location.href="main.html";
  }

</script>
</body>
</html>